Skip to content

feat(command): Add bare group help Json output support - #78

Merged
jpage-godaddy merged 3 commits into
mainfrom
feat/help-json-output
Aug 17, 2026
Merged

feat(command): Add bare group help Json output support#78
jpage-godaddy merged 3 commits into
mainfrom
feat/help-json-output

Conversation

@mguerrero3-godaddy

Copy link
Copy Markdown
Collaborator

Summary

  • Reimplements feat(command): Add BareGroupAction support #76 based on several ideas shared on that PR. Simpler, no bare group actions to define by consumers on each command, but a default general behavior reusing thetree --json command scoping to the location of that group command.

NOTE: This isn't implementing the --help --json approach, this just ensures that bare group commands now expose their subcommand tree as structured, machine-readable discovery output by default, instead of silently falling back to human-oriented clap help text that a script or agent can't parse. The discussion to implement --help --json is opened as an idea from @jpage-godaddy and can be implemented here or in a separate PR.

Test plan

  • cargo fmt --all --check
  • cargo clippy --all-targets -- -D warnings
  • cargo test --all-targets

Manual verification

Setup:

# In the cli repo, temporarily override the engine dependency:
cd cli/rust
# Edit Cargo.toml → cli-engine = { features = ["pkce-auth"], path = "../../cli-engine" }
cargo build --release && cp target/release/gddy ~/.local/bin/gddy

Test WITHOUT the fix (baseline):

cd cli-engine && git checkout main
cd cli/rust && cargo build --release && cp target/release/gddy ~/.local/bin/gddy
# <command to reproduce the issue>
# Expected: <describe broken behavior>

Test WITH the fix:

cd cli-engine && git checkout <this-branch>
cd cli/rust && cargo build --release && cp target/release/gddy ~/.local/bin/gddy
# <same command>
# Expected: <describe fixed behavior>

Cleanup:

# Revert cli/rust/Cargo.toml back to:
# cli-engine = { features = ["pkce-auth"], version = "<published-version>" }

@jpage-godaddy
jpage-godaddy merged commit 94444ab into main Aug 17, 2026
2 checks passed
@jpage-godaddy
jpage-godaddy deleted the feat/help-json-output branch August 17, 2026 16:46
@github-actions github-actions Bot mentioned this pull request Aug 17, 2026
jpage-godaddy pushed a commit that referenced this pull request Aug 17, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>cli-engine: 0.8.5</summary>

##
[0.8.5](cli-engine-v0.8.4...cli-engine-v0.8.5)
(2026-08-17)


### Features

* **command:** Add bare group help Json output support
([#78](#78))
([94444ab](94444ab))
* **output:** add TableColumn::align for right-aligned table columns
([#94](#94))
([2d2bf27](2d2bf27))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants